package com.koro.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koro.annotation.Column;
import com.koro.annotation.ColumnComment;
import com.koro.annotation.Table;
import com.koro.annotation.TableComment;
import com.koro.constants.MySqlTypeConstant;
import lombok.Data;

import java.math.BigDecimal;

@Data
@TableName("t_shop_cart")
@Table(name = "t_shop_cart")
@TableComment("订单管理")
public class ShopCart {

    @TableId(value = "id",type = IdType.AUTO)
    @Column(name = "id",type = MySqlTypeConstant.INT,isKey = true,isAutoIncrement = true)
    @ColumnComment(value = "购物车id")
    private Integer id;

    @Column(name = "users_id",type = MySqlTypeConstant.INT,length = 13)
    @ColumnComment(value = "用户id")
    private Integer usersId;

    @Column(name = "goods_id",type = MySqlTypeConstant.INT,length = 13)
    @ColumnComment(value = "商品id")
    private Integer goodsId;

    @Column(name = "goods_price",type = MySqlTypeConstant.DECIMAL,length = 18, decimalLength = 6)
    @ColumnComment(value = "商品价格")
    private BigDecimal goodsPrice;

    @Column(name = "goods_num",type = MySqlTypeConstant.DECIMAL,length = 18, decimalLength = 6)
    @ColumnComment(value = "商品数量")
    private BigDecimal goodsNum;

    @Column(name = "type",type = MySqlTypeConstant.INT,length = 1)
    @ColumnComment(value = "状态,0 未下单； 1 已下单")
    private Integer type;

}
